function getCoors(e)
{
if(!e){var e = window.event;}
var x = e.screenX;
var y = e.screenY;
alert(x + ', ' + y);
return false;
}
//window.onclick=getCoors;

function fakeClick(x, y)
{
  var evt = document.createEvent('MouseEvents');
  evt.initMouseEvent('click', true, true, document.defaultView, 1, x, y, 0, 0, false, false, false, false, 0, null);
  this.dispatchEvent(evt);
}
